{namespace rebar.demo.template.EditJobPage}

/**
 * The page html
 * @param editJobName
 */
{template .pageHtml}
<form class="form-horizontal">
  <div class="form-group">
    <label class="col-sm-2 control-label">Name</label>
    <div class="col-sm-10">
      <input name="name" type="text" class="form-control" placeholder="job name"
          {if $editJobName}disabled="disabled"{/if}
          {rebar.view.Input.NODE_ATTR.VALIDATION_REG}="^[\w]{lb}1,64{rb}$">
      <span class="help-block" style="display:none;">Name can contains only letters, numbers, or the underscore character, and less than 64 letters</span>
    </div>
  </div>
  <div class="form-group">
    <label class="col-sm-2 control-label">Cron Expression</label>
    <div class="col-sm-10">
      <input name="cronExpression" type="text" class="form-control" placeholder="0 0 * * *"
          {rebar.view.Input.NODE_ATTR.VALIDATION_REG}="^\s*(\S+\s+){lb}4{rb}\S+\s*$">
    </div>
  </div>
  <div class="form-group">
    <label class="col-sm-2 control-label">Basetime Correction</label>
    <div class="col-sm-10">
      <input name="basetimeCorrectionSec" type="text" class="form-control" placeholder="seconds"
          {rebar.view.Input.NODE_ATTR.VALIDATION_REG}="^-{lb}0,1{rb}\d+">
      <span class="help-block" style="display:none;">Only integer allowed</span>
    </div>
  </div>
  <div class="form-group">
    <label class="col-sm-2 control-label">HQL</label>
    <div class="col-sm-10">
      <textarea name="hql" class="hql form-control" placeholder="select * from table limit 10;"></textarea>
    </div>
  </div>
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <button type="submit" class="btn btn-default">Submit</button>
    </div>
  </div>
</form>
{/template}

